Page({
    data: {
        radioItems: wx.getStorageSync('curUserInfo').merShopInfos,
        curShop: wx.getStorageSync('_curShop')
    },
    onShow(){
        this.setData({
            curShop: wx.getStorageSync('_curShop'),
            radioItems: wx.getStorageSync('curUserInfo').merShopInfos
        })
    },
    radioChange: function (e) {
        console.log('radio发生change事件，携带value值为：', e.detail.value);

        const curShopInfo = this.data.radioItems.filter(item => item.shopNo === e.detail.value)[0]

        wx.setStorageSync('_curShop', curShopInfo);

        this.setData({
            curShop: curShopInfo
        });
        wx.switchTab({
            url: "/pages/my/index"
          })
    }
})